package com.xiaode.controller.app.teacher.student;

import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import com.jfinal.ext.cors.EnableCORS;
import com.jfinal.kit.Ret;
import com.xiaode.common.model.Admin;
import com.xiaode.util.apidoc.annotation.Api;
import com.xiaode.util.apidoc.annotation.ApiOper;
import com.xiaode.util.apidoc.annotation.ApiPara;
import javax.validation.constraints.NotBlank;
import java.util.Date;

@Path("/tStudent")
@Api("教师绑定学生相关服务")
@EnableCORS
public class StudentController extends Controller {
    @Inject
    StudentService service;

    /**
     * 展示学生信息
     * @param date
     */
    @ApiOper("展示学生数据")
    public void exhibitionStudent(@NotBlank @ApiPara(value = "date",notes = "日期") Date date)throws Exception{
        Admin admin = getAttr("user");
        Ret ret = service.exhibitionStudent(admin.getId(),date);
        renderJson(ret);
    }

    

}
